import { createMemoryHistory, createRouter } from 'vue-router'

import Home from '@/pages/home.vue'
import Login from '@/pages/login.vue'

const routes = [
  { path: '/', component: Home },
  { path: '/login', component: Login },
]

const router = createRouter({
  history: createMemoryHistory(),
  routes,
})

// 路由拦截
router.beforeEach((to, from, next) => {
  next();
});

export default router
